{"ast":null,"code":"export var getLastMessage=function getLastMessage(messagesList){return messagesList.items[messagesList.items.length-1];};export var getUserNameLastMessage=function getUserNameLastMessage(user,store){return user.id===store.getProfile().id?'Вы:':\"\".concat(user.firstName||user.nickname,\":\");};","map":{"version":3,"names":["getLastMessage","messagesList","items","length","getUserNameLastMessage","user","store","id","getProfile","firstName","nickname"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/src/utils/Chat.ts"],"sourcesContent":["import {MessagesListItem} from \"../models/response/MessagesListItem\";\nimport {MessagesListResponse} from \"../models/response/MessagesListResponse\";\nimport {UserListItem} from \"../models/response/UserListItem\";\nimport Store from \"../store/store\";\n\nexport const getLastMessage = (messagesList: MessagesListResponse): MessagesListItem => {\n    return messagesList.items[messagesList.items.length - 1];\n}\n\nexport const getUserNameLastMessage = (user: UserListItem, store: Store): string => {\n    return (user.id === store.getProfile().id)?'Вы:':`${user.firstName || user.nickname}:`;\n}"],"mappings":"AAKA,MAAO,IAAMA,eAAc,CAAG,QAAjBA,eAAc,CAAIC,YAAkC,CAAuB,CACpF,MAAOA,aAAY,CAACC,KAAK,CAACD,YAAY,CAACC,KAAK,CAACC,MAAM,CAAG,CAAC,CAAC,CAC5D,CAAC,CAED,MAAO,IAAMC,uBAAsB,CAAG,QAAzBA,uBAAsB,CAAIC,IAAkB,CAAEC,KAAY,CAAa,CAChF,MAAQD,KAAI,CAACE,EAAE,GAAKD,KAAK,CAACE,UAAU,EAAE,CAACD,EAAE,CAAE,KAAK,WAAIF,IAAI,CAACI,SAAS,EAAIJ,IAAI,CAACK,QAAQ,KAAG,CAC1F,CAAC"},"metadata":{},"sourceType":"module"}